package org.swidgets.base.spanels;



import org.swidgets.base.BorderStyleRepository;

import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.Widget;


public class SDialog extends Composite{
	private SFrame cornice=new SFrame();
	private com.google.gwt.user.client.ui.SimplePanel simplePanel=new com.google.gwt.user.client.ui.SimplePanel();
	private SSimplePanel contenuto=new SSimplePanel();
	public SDialog(){
		super();
		this.initWidget(simplePanel);
		simplePanel.add(cornice);
		contenuto.setHeight("100%");
		cornice.setStyle(BorderStyleRepository.dialog);
		cornice.addStyleName("fontZero");
		this.cornice.setBodyWidget(contenuto);
		contenuto.addStyleName("fontZero");
	}
	public void add(Widget w){
		this.contenuto.add(w);
	}
	public void setTitle(String title){
		this.cornice.setCaption(title);
	}
	
	public void setHeader(Widget w){
		this.cornice.setHeaderWidget(w);
	}
	
	public void setFooter(Widget w){
		this.cornice.setFooterWidget(w);
	}
	public void showHeader(){
		this.cornice.showHeader();
	}
	public void showFooter(){
		this.cornice.showFooter();
	}
	public void hideHeader(){
		this.cornice.hideHeader();
	}
	public void hideFooter(){
		this.cornice.hideFooter();
	}
}
